/**
 * Created by Fesine on 2017/3/4.
 */
Ext.define('core.product.view.ProductWindow', {
    extend: 'Ext.window.Window',
    alias: 'widget.productWindow',
    id: 'productWindow',
    title: "批量配置编辑",
    width: 550,
    height: 300,
    layout: "fit",
    // items:'productform',
    items: {
        xtype: "form",
        margin: 5,
        border: false,
        bodyStyle: 'padding:5 5 5 5',
        fieldDefaults: {
            labelAlign: 'left',
            labelWidth: 100
        },
        tbar: [{
            xtype: "button",
            ref: "save",
            iconCls: "table_save",
            text: "保存"
        }, {
            text: '重置',
            iconCls: "wfreturn",
            ref: "reset"
        }, {
            xtype: "button",
            ref: "return",
            iconCls: "return",
            text: "返回"
        }],
        items: [{
            xtype: 'textfield',
            name: 'id',
            id: 'quartzId',
            fieldLabel: 'id',
            allowBlank: false
        }, {
            xtype: 'textfield',
            name: 'groupId',
            allowBlank: false,
            fieldLabel: '任务组ID'
        }, {
            xtype: 'textfield',
            name: 'cronExpression',
            fieldLabel: 'CRON表达式'
        }, {
            xtype: 'datefield',
            name: 'startTime',
            format: 'Y-m-d',
            fieldLabel: '开始时间'
        }, {
            xtype: 'datefield',
            name: 'stopTime',
            format: 'Y-m-d',
            fieldLabel: '结束时间'
        }, {
            xtype: 'combobox',
            name: 'status',
            fieldLabel: '启用状态',
            allowBlank: false,
            store: Ext.create("Ext.data.Store", {
                fields: ["value", "name"],
                data: [
                    {value: '1', name: "启用"},
                    {value: '0', name: "停用"}
                ]
            }),
            forceSelection: true,
            queryMode: 'local',
            displayField: 'name',
            valueField: 'value',
            // value:'0',
            emptyText: '请选择'
        }, {
            xtype: 'textfield',
            name: 'quartzJobClass',
            width: 500,
            fieldLabel: '执行类'
        }, {
            height: 10,
            bodyStyle: 'background:transparent',//设置为透明,不妨碍更换主题了
            border: 0
        }]
    },
    // buttons: [
    //     {
    //         text: "保存", handler: function () {
    //         win.down("form").updateRecord();
    //         record.commit();
    //         win.close();
    //     }
    //     }
    // ],
    initComponent: function () {
        this.callParent(arguments);
    }
});